package lab4;

import lab2.Employee;
import lab2.RegularStaff;
import lab2.VisitorInterface;
import lab4TwiceTest.EmployeeVisitor;

public class PartTimeJob extends Employee {
    public int getHours() {
        return hours;
    }

    int hours;
    String name;

    public PartTimeJob(){}
    public PartTimeJob(String name){
        this.name = name;
    }

    @Override
    public void setWorkingHours(int hours) {
        this.hours = hours;
    }

    @Override
    public void accept(VisitorInterface visitor) {
        visitor.visit(this);
    }

    @Override
    public void accept(EmployeeVisitor visitor) {
        visitor.visit(this);
    }

    public String getName() {
        return name;
    }
}
